Xbasic

AGE Function

Syntax

Number_Of_Years as N = age(D dob [,D AsOfDate ])

Arguments

dob

The first date.

AsOfDate

Optional. Default = DATE(). The second date to use in calculating the age.

Description

Computes a person's age. If AsOfDate is not supplied, then age as of today is computed. If AsOfDate is supplied, then age on the AsOfDate is computed.

Discussion

AGE() returns the integer number of years between Starting_Date and Ending_Date (default now).

Example

age({12/18/1952}) -> 49

See Also